package com.financing.wap.dao.impl;

import java.math.BigDecimal;
import java.util.List;

import org.springframework.stereotype.Repository;

import com.financing.wap.common.SqlName;
import com.financing.wap.dao.IActivitiesGroupDao;
import com.financing.wap.dto.ActivitiesGroupDTO;
import com.financing.wap.vo.ActivitiesGroupVO;

@SuppressWarnings({ "unchecked", "deprecation" })
@Repository("activitiesGroupDao")
public class ActivitiesGroupDaoImpl extends BaseDaoImpl<ActivitiesGroupDTO, java.lang.Integer> implements IActivitiesGroupDao {


	@Override
	public Class<ActivitiesGroupDTO> getEntityClass() {
		return ActivitiesGroupDTO.class;
	}

	@Override
	public List<ActivitiesGroupDTO> queryActivitiesGroup(ActivitiesGroupDTO agd) throws Exception {
		return this.getSqlMapClientTemplate().queryForList(SqlName.queryActivitiesGroup,agd);
	}

	@Override
	public int addActivitiesGroup(ActivitiesGroupDTO agd) throws Exception {
		return (Integer) this.getSqlMapClientTemplate().insert(SqlName.addActivitiesGroup, agd);
	}

	@Override
	public int updateActivitiesGroup(ActivitiesGroupDTO agd) throws Exception {
		return this.getSqlMapClientTemplate().update(SqlName.updateActivitiesGroup, agd);
	}

	@Override
	public List<ActivitiesGroupVO> queryActivitiesGroupSuccess(ActivitiesGroupDTO agd) throws Exception {
		return this.getSqlMapClientTemplate().queryForList(SqlName.queryActivitiesGroupSuccess, agd);
	}

	@Override
	public List<ActivitiesGroupVO> queryShareActivitiesGroup(ActivitiesGroupDTO agd) throws Exception {
		return this.sqlMapClientTemplate.queryForList(SqlName.queryShareActivitiesGroup, agd);
	}

	@Override
	public List<ActivitiesGroupVO> queryActivitiesGroupMemberInfo(ActivitiesGroupDTO agd) throws Exception {
		return this.sqlMapClientTemplate.queryForList(SqlName.queryActivitiesGroupMemberInfo,agd);
	}

	@Override
	public List<ActivitiesGroupVO> queyActivitiesGroupGift(ActivitiesGroupDTO adg) throws Exception {
		return this.sqlMapClientTemplate.queryForList(SqlName.queyActivitiesGroupGift,adg);
	}

	@Override
	public BigDecimal queryOneUserNotGetGiftAmount(ActivitiesGroupDTO adg) throws Exception {
		return (BigDecimal) this.sqlMapClientTemplate.queryForObject(SqlName.queryOneUserNotGetGiftAmount,adg);
	}

	@Override
	public BigDecimal queryOneUserAllGiftAmount(ActivitiesGroupDTO adg) throws Exception {
		return (BigDecimal) this.sqlMapClientTemplate.queryForObject(SqlName.queryOneUserAllGiftAmount,adg);
	}

	@Override
	public List<ActivitiesGroupVO> queryActivitiesGroupJob(ActivitiesGroupDTO adg) throws Exception {
		return this.sqlMapClientTemplate.queryForList(SqlName.queryActivitiesGroupJob,adg);
	}

	@Override
	public int updateActivitiesGroupName(ActivitiesGroupDTO adg) throws Exception {
		return this.sqlMapClientTemplate.update(sqlName.updateActivitiesGroupName,adg);
	}



}
